package gov.pbc.nn.kjgl.jfcr.view;

import java.util.Collection;

import gov.pbc.nn.kjgl.entity.ComputerRoomEntryType;
import gov.pbc.nn.kjgl.jfcr.dao.ComputerRoomEntryTypeDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.data.provider.Page;

/**
 * 机房后台pr的业务逻辑
 * 
 * @author jack.zhao
 * 
 */
@Component("computerRoomEntryTypePR")
public class ComputerRoomEntryTypePR {

	@Autowired
	private ComputerRoomEntryTypeDao computerRoomEntryTypeDao;

	/**
	 * 调用dao分页
	 * 
	 * @param page
	 */
	@DataProvider
	public void getComputerRoomTypePage(Page<ComputerRoomEntryType> page) {
		computerRoomEntryTypeDao.getComputerRoomEntryTypePage(page);
	}

	/**
	 * 更新集合
	 * 
	 * @param lists
	 */
	@DataResolver
	@Transactional
	public void updateEntity(Collection<ComputerRoomEntryType> lists) {
		computerRoomEntryTypeDao.updateComputerRoomEntryType(lists);
	}
}
